package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 t_orders
 *
 * @author ruoyi
 * @date 2025-06-24
 */
public class TOrders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal paymentAmount;

    /** 打包费 */
    @Excel(name = "打包费")
    private BigDecimal packAmount;

    /** 运费 */
    @Excel(name = "运费")
    private BigDecimal freightAmount;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Long orderStatus;

    /** 支付方式 */
    @Excel(name = "支付方式")
    private Long paymentType;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    /** 收货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "收货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date receiveTime;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String receiverName;

    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String receiverPhone;

    /** 地址簿id */
    @Excel(name = "地址簿id")
    private Long addressBookId;

    /** 收货人地址 */
    @Excel(name = "收货人地址")
    private String receiverAddress;

    /** 取消订单原因 */
    @Excel(name = "取消订单原因")
    private String cancelReason;

    /** 取消订单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;

    /** 配送人id */
    @Excel(name = "配送人id")
    private Long deliveryId;

    /** 配送人姓名 */
    @Excel(name = "配送人姓名")
    private String deliveryName;

    /** 配送人电话 */
    @Excel(name = "配送人电话 ")
    private String deliveryPhone;


    /** 配送方式 */
    @Excel(name = "配送方式")
    private String deliveryStatus;

    /** 预计送达时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "预计送达时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss   ")
    private Date estimatedDeliveryTime;

    /** 餐具数量 */
    @Excel(name = "餐具数量")
    private Long tablewareNumber;

    /** 餐具数量状态 */
    @Excel(name = "餐具数量状态")
    private Long tablewareStatus;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;
    // 订单明细列表
    private List<TOrderDetails> detailsList;

    //订单日志跟踪列表
    private List<TTakeoutLog> takeoutLogList;

    public List<TTakeoutLog> getTakeoutLogList() {
        return takeoutLogList;
    }

    public void setTakeoutLogList(List<TTakeoutLog> takeoutLogList) {
        this.takeoutLogList = takeoutLogList;
    }

    public List<TOrderDetails> getDetailsList() {
        return detailsList;
    }

    public void setDetailsList(List<TOrderDetails> detailsList) {
        this.detailsList = detailsList;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setOrderNo(String orderNo)
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo()
    {
        return orderNo;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }

    public void setPaymentAmount(BigDecimal paymentAmount)
    {
        this.paymentAmount = paymentAmount;
    }

    public BigDecimal getPaymentAmount()
    {
        return paymentAmount;
    }

    public void setPackAmount(BigDecimal packAmount)
    {
        this.packAmount = packAmount;
    }

    public BigDecimal getPackAmount()
    {
        return packAmount;
    }

    public void setFreightAmount(BigDecimal freightAmount)
    {
        this.freightAmount = freightAmount;
    }

    public BigDecimal getFreightAmount()
    {
        return freightAmount;
    }

    public void setOrderStatus(Long orderStatus)
    {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus()
    {
        return orderStatus;
    }

    public void setPaymentType(Long paymentType)
    {
        this.paymentType = paymentType;
    }

    public Long getPaymentType()
    {
        return paymentType;
    }

    public void setPaymentTime(Date paymentTime)
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime()
    {
        return paymentTime;
    }

    public void setDeliveryTime(Date deliveryTime)
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime()
    {
        return deliveryTime;
    }

    public void setReceiveTime(Date receiveTime)
    {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime()
    {
        return receiveTime;
    }

    public void setReceiverName(String receiverName)
    {
        this.receiverName = receiverName;
    }

    public String getReceiverName()
    {
        return receiverName;
    }

    public void setReceiverPhone(String receiverPhone)
    {
        this.receiverPhone = receiverPhone;
    }

    public String getReceiverPhone()
    {
        return receiverPhone;
    }

    public void setAddressBookId(Long addressBookId)
    {
        this.addressBookId = addressBookId;
    }

    public Long getAddressBookId()
    {
        return addressBookId;
    }

    public void setReceiverAddress(String receiverAddress)
    {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverAddress()
    {
        return receiverAddress;
    }

    public void setCancelReason(String cancelReason)
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason()
    {
        return cancelReason;
    }

    public void setCancelTime(Date cancelTime)
    {
        this.cancelTime = cancelTime;
    }

    public Date getCancelTime()
    {
        return cancelTime;
    }

    public void setDeliveryId(Long deliveryId)
    {
        this.deliveryId = deliveryId;
    }

    public Long getDeliveryId()
    {
        return deliveryId;
    }

    public void setDeliveryName(String deliveryName)
    {
        this.deliveryName = deliveryName;
    }

    public String getDeliveryName()
    {
        return deliveryName;
    }

    public void setDeliveryPhone(String deliveryPhone) {
        this.deliveryPhone = deliveryPhone;
    }

    public void setDeliveryStatus(String deliveryStatus)
    {
        this.deliveryStatus = deliveryStatus;
    }

    public String getDeliveryStatus()
    {
        return deliveryStatus;
    }

    public void setEstimatedDeliveryTime(Date estimatedDeliveryTime)
    {
        this.estimatedDeliveryTime = estimatedDeliveryTime;
    }

    public Date getEstimatedDeliveryTime()
    {
        return estimatedDeliveryTime;
    }

    public void setTablewareNumber(Long tablewareNumber)
    {
        this.tablewareNumber = tablewareNumber;
    }

    public Long getTablewareNumber()
    {
        return tablewareNumber;
    }

    public void setTablewareStatus(Long tablewareStatus)
    {
        this.tablewareStatus = tablewareStatus;
    }

    public Long getTablewareStatus()
    {
        return tablewareStatus;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return "TOrders{" +
                "id=" + id +
                ", orderNo='" + orderNo + '\'' +
                ", userId=" + userId +
                ", totalAmount=" + totalAmount +
                ", paymentAmount=" + paymentAmount +
                ", packAmount=" + packAmount +
                ", freightAmount=" + freightAmount +
                ", orderStatus=" + orderStatus +
                ", paymentType=" + paymentType +
                ", paymentTime=" + paymentTime +
                ", deliveryTime=" + deliveryTime +
                ", receiveTime=" + receiveTime +
                ", receiverName='" + receiverName + '\'' +
                ", receiverPhone='" + receiverPhone + '\'' +
                ", addressBookId=" + addressBookId +
                ", receiverAddress='" + receiverAddress + '\'' +
                ", cancelReason='" + cancelReason + '\'' +
                ", cancelTime=" + cancelTime +
                ", deliveryId=" + deliveryId +
                ", deliveryName='" + deliveryName + '\'' +
                ", deliveryPhone='" + deliveryPhone + '\'' +
                ", deliveryStatus='" + deliveryStatus + '\'' +
                ", estimatedDeliveryTime=" + estimatedDeliveryTime +
                ", tablewareNumber=" + tablewareNumber +
                ", tablewareStatus=" + tablewareStatus +
                ", delFlag='" + delFlag + '\'' +
                ", detailsList=" + detailsList +
                ", takeoutLogList=" + takeoutLogList +
                '}';
    }
}
